package cn.tedu.charging.order.feign;

import cn.tedu.charging.common.pojo.vo.UserInfoVO;
import cn.tedu.charging.common.web.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;

@FeignClient("userService")
public interface UserClient {
//    目的:通过OpenFeign调用nacos注册中心的服务

    @GetMapping("/user/info/{userId}")
    JsonResult<UserInfoVO> getUserInfo(@PathVariable("userId") Long userId) ;

    @GetMapping("/user/balance/{userId}")
    JsonResult<BigDecimal> getUserBalance(@PathVariable("userId") Integer userId);
}
